package com.cloudm.technician.data.network

import com.cloudm.technician.data.model.Response
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * 作者: wesley
 * 时间: 2017/12/13
 * 描述: 个人模块相关的界面---修改头像、修改密码
 */
interface PersonalApi {


    /**
     * 修改昵称
     */
    @FormUrlEncoded
    @POST("azb/json/member/modifyNickname")
    fun modifyNickname(@Field("nickname") nickname: String): Observable<Response<String?>>


    /**
     * 修改密码
     */
    @FormUrlEncoded
    @POST("azb/json/member/modifyPassword")
    fun modifyPassword(@Field("oldPassword") oldPassword: String, @Field(
            "newPassword") newPassword: String): Observable<Response<String?>>


    /**
     * 修改头像
     */
    @FormUrlEncoded
    @POST("azb/json/member/uploadLogo")
    fun modifyLogo(@Field("logo") logo: String): Observable<Response<String?>>

}